if (self.CavalryLogger) { CavalryLogger.start_js(["O8x56"]); } __d("MLogoutClearCache",["MCache","Stratcom"],(function(a,b,c,d,e,f){b("Stratcom").listen("click","logout",b("MCache").clear)}),null); __d("KaiOSSendMessageUtil",["Event"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a=function(){__p&&__p();function a(){this.$1=!1,this.$2=null,this.$3()}var c=a.prototype;c.$3=function(){var a=this;this.$2=b("Event").listen(window,"beforeunload",function(){a.$1=!0,a.$2&&(a.$2.remove(),a.$2=null)})};c.postMessage=function(a,b,c,d){if(a&&b&&!this.$1){var e=new Map();e.set(g.Action,b);c&&e.set(g.ActionPayload,c);d!=null&&e.set(g.CallbackID,d);a.postMessage(e,"*")}};return a}();var g={Type:Object.freeze({HANDLE_BACK:"handle_back",MESSAGE_RECEIVED:"received",OPEN_URL:"open_url",REGISTER_PUSH:"register_push",SCREEN_ORIENTATION_LOCK:"screen_orientation_lock",UNREGISTER_PUSH:"unregister_push",CHECK_FOR_PUSH_UPDATE:"check_for_push_update",PUSH_UPDATE_COMPLETED:"push_update_completed",SET_VOLUME:"set_volume",FBT_STRINGS:"fbt_strings",CONFIG_RESPONSE:"config_response",FETCH_MSISDN:"fetch_msisdn",GET_CONTACTS:"get_contacts",TOGGLE_SPATIAL_NAV:"toggle_spatial_nav",LITE_MIGRATION_STATUS:"lite_migration_status"}),Action:"action",ActionPayload:"payload",CallbackID:"callback_id",_singletonImpl:new a(),postMessage:function(a,b,c,d){g._singletonImpl.postMessage(a,b,c,d)}};e.exports=g}),null); __d("KaiOSConnectionHelper",["KaiOSSendMessageUtil"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g="app://m.facebook.com";a=function(){__p&&__p();function a(){this.hostWindow=null,this.resolveOnConnect=null}var c=a.prototype;c.receiveMessage=function(a){if(!a||a.origin!==g||!a.source)return!1;if(a.data==="ping"){this.hostWindow||(this.hostWindow=a.source,b("KaiOSSendMessageUtil").postMessage(this.hostWindow,b("KaiOSSendMessageUtil").Type.MESSAGE_RECEIVED));a=this.resolveOnConnect;a&&(a(),this.resolveOnConnect=null)}return!0};return a}();c=new a();e.exports=c}),null); __d("KaiOSControllerConfig",[],(function(a,b,c,d,e,f){"use strict";a={};e.exports=a}),null); __d("URLSearchParams",[],(function(a,b,c,d,e,f){__p&&__p();var g=/\+/g,h=/[!\'()*]/g,i=/%20/g;function j(a){return encodeURIComponent(a).replace(i,"+").replace(h,function(a){return"%"+a.charCodeAt(0).toString(16)})}function k(a){return decodeURIComponent((a=a)!=null?a:"").replace(g," ")}var l=typeof Symbol==="function"?Symbol.iterator:"@@iterator";a=function(){"use strict";__p&&__p();function a(a){a===void 0&&(a="");a=a;a[0]==="?"&&(a=a.substr(1));this.$1=a.length?a.split("&").map(function(a){a=a.split("=");var b=a[0];a=a[1];return[k(b),k(a)]}):[]}var b=a.prototype;b.append=function(a,b){this.$1.push([a,String(b)])};b["delete"]=function(a){for(var b=0;b0||b===0&&a.getAttribute("tabIndex")!==null)return!0;if(a instanceof HTMLAnchorElement)return!!a.href&&a.rel!="ignore";else if(a instanceof HTMLInputElement)return a.type!="hidden"&&a.type!="file"&&!a.disabled;else if(a instanceof HTMLButtonElement||a instanceof HTMLSelectElement||a instanceof HTMLTextAreaElement)return!a.disabled;return!1}var i={isTextfieldInput:function(a){return a instanceof HTMLTextAreaElement||a instanceof HTMLInputElement&&(g.includes(a.type)||a.type==="")},isLink:function(a){return a.tagName==="A"},isNTElement:function(a){return a.hasAttribute("data-nt")},isFileUploadElement:function(a){return a.hasAttribute("data-kaios-file-upload-element")},isSpatialNavElement:function(a){return(a.hasAttribute("data-kaios-spatial-navigation")||a.hasAttribute("data-kaios-whitelist-nav")||h(a))&&!a.hasAttribute("data-kaios-blacklist-nav")&&i.isVisible(a)},isVisible:function(a){return(a.offsetHeight!==0&&a.offsetWidth!==0||a.offsetParent!==null)&&window.getComputedStyle(a).visibility!=="hidden"},getFirstLink:function(a){__p&&__p();for(var b=0;b0&&b("Scroll").getTop(c)>=e?a.prevent():a.stop()}};d.$MOverlay6=function(a){this.$MOverlay1=a.getTouch().clientY};d.$MOverlay7=function(a){this.$MOverlay1=null};d.onScroll=function(a){b("clearTimeout")(this.$MOverlay11),this.$MOverlay11=b("setTimeoutAcrossTransitions")(this.updatePosition.bind(this),100)};d.onResize=function(a){b("clearTimeout")(this.$MOverlay12),this.$MOverlay12=b("setTimeoutAcrossTransitions")(this.updatePosition.bind(this),100)};d.onFocus=function(a){this.$MOverlay10=!0};d.onBlur=function(a){this.$MOverlay10=!1,this.updatePosition(),this.$MOverlay8=b("setTimeoutAcrossTransitions")(this.updatePosition.bind(this),1e3)};d.getUpdatePositionBlocked=function(){return this.$MOverlay10};d.getInsertParent=function(){var c=this.insertParent;c||(c=b("ge")("page"));return c||a.prototype.getInsertParent.call(this)};return c}(b("MLayer"));e.exports=a}),null); __d("SpatialNavControllerTypes",[],(function(a,b,c,d,e,f){"use strict";a=Object.freeze({CONTEXT_STACK:"context_stack",MENU_CONTEXT:"menu_context",NO_CONTEXT:"no_context"});e.exports={SpatialNavContextState:a}}),null); __d("SpatialNavMutationSpecTypes",[],(function(a,b,c,d,e,f){"use strict";a=Object.freeze({PUSH_CONTEXT:"push_context",POP_CONTEXT:"pop_context",MOVE_TO_NODE:"move_to_node",INTERACT_WITH_NODE:"interact_with_node",REBUILD_TREE:"rebuild_tree",BUILD_MENU:"build_menu",HIGHLIGHT_NODE:"highlight_node",SWITCH_CONTEXT:"switch_context",CLEAR_CONTEXT:"clear_context",REMOVE_CONTEXT:"remove_context",REBUILD_PARTIAL_TREE:"rebuild_partial_tree"});e.exports=a}),null); __d("SpatialNavTreeNodeUtils",["cx","CSS","MViewport","Vector"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h={isPrimaryNode:function(a){return a.getHTMLElement().hasAttribute("data-kaios-spatial-navigation")},isFocusTransparent:function(a){return a.getHTMLElement().hasAttribute("data-kaios-focus-transparent")},shouldPreventClickThrough:function(a){return a.getHTMLElement().hasAttribute("data-kaios-no-click-through")},shouldSwallowClick:function(a){return a.getHTMLElement().hasAttribute("data-kaios-swallow-click")},isPrimaryOverrideChild:function(a){var b=a.getParent();return b!=null&&b.getPrimaryChildOverride()===a},shouldStylePrimaryInstead:function(a){return!h.isPrimaryNode(a)&&a.getHTMLElement().hasAttribute("data-kaios-style-parent-instead")},shouldStyleParentHTML:function(a){return!h.isPrimaryNode(a)&&a.getHTMLElement().hasAttribute("data-kaios-style-parent-html")},shouldStyleChildHTML:function(a){return!h.isPrimaryNode(a)&&a.getHTMLElement().hasAttribute("data-kaios-style-child-html")},shouldClickChildInstead:function(a){return!h.isPrimaryNode(a)&&a.getHTMLElement().hasAttribute("data-kaios-click-through")},getFirstHighlightableNode:function(a){a=a.getFirstChild();while(a!=null&&h.isFocusTransparent(a))a=a.getFirstChild();return a},getLastHighlightableNode:function(a){a=a.getLastChild();while(a!=null&&h.isFocusTransparent(a))a=a.getLastChild();return a},getFirstHighlightableNodeInViewport:function(a){__p&&__p();var c=[],d=a.getChildren();for(var e=d.length-1;e>=0;e--)c.push(d[e]);while(c.length!==0){d=c.pop();e=d.getHTMLElement();var f=b("Vector").getPos(e).y,g=b("MViewport").getScrollTop();if(!h.isFocusTransparent(d)&&f-g>0)return d;else if(f+e.clientHeight>g){f=d.getChildren();for(var e=f.length-1;e>=0;e--)c.push(f[e])}}return this.getFirstHighlightableNode(a)},getPrevNode:function(a){__p&&__p();var b=a.getLeftSibling();if(b!=null){b=b;var c=b.getLastChild();while(c!=null)b=c,c=c.getLastChild();return b}c=a.getParent();return c!=null&&c.getParent()!=null?c:null},getNextNode:function(a){__p&&__p();var b=a.getFirstChild();if(b!=null)return b;b=a.getRightSibling();if(b!=null)return b;b=a.getParent();while(b!=null){a=b.getRightSibling();if(a!=null)return a;b=b.getParent()}return null},getPrevNodeFiltered:function(a,b){a=h.getPrevNode(a);while(a!=null){if(b(a))return a;a=h.getPrevNode(a)}return null},getNextNodeFiltered:function(a,b){a=h.getNextNode(a);while(a!=null){if(b(a))return a;a=h.getNextNode(a)}return null},getRootNode:function(a){var b=a;a=a.getParent();while(a!=null)b=a,a=b.getParent();return b},findNodeForElement:function(a,b){__p&&__p();b=[b];var c;while(b.length!==0){c=b.pop();if(c.getHTMLElement()===a)return c;c=c.getChildren();for(var d=0;d=b.length)break;e=b[d++]}else{d=b.next();if(d.done)break;e=d.value}e=e;var f=e.getHTMLElement();if(f===a||f.compareDocumentPosition(a)&(Node.DOCUMENT_POSITION_CONTAINS|Node.DOCUMENT_POSITION_CONTAINED_BY))return e}return null},getStyledHTMLElement:function(a){__p&&__p();var b=a.getHTMLElement(),c=a.getParent();if(h.shouldStylePrimaryInstead(a)&&c!=null)b=c.getHTMLElement();else if(h.shouldStyleParentHTML(a)){c=a.getHTMLElement().parentElement;c!=null&&(b=c)}else if(h.shouldStyleChildHTML(a)&&a.getHTMLElement().children.length>0){c=a.getHTMLElement().children[0];c!=null&&(b=c)}return b}};e.exports=h}),null); __d("TraverserUtils",["SpatialNavMutationSpecTypes"],(function(a,b,c,d,e,f){"use strict";function a(a,c){return[{mutationType:b("SpatialNavMutationSpecTypes").MOVE_TO_NODE,currentNode:a,nextNode:c}]}e.exports={getSingleMoveToNodeMutation:a}}),null); __d("HierarchicalTraverser",["invariant","SpatialNavMutationSpecTypes","SpatialNavTreeNodeUtils","TraverserUtils"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("TraverserUtils").getSingleMoveToNodeMutation;function i(a,c){if(c==null)return[];if(b("SpatialNavTreeNodeUtils").isFocusTransparent(c)){var d;d=(d=c.getPrimaryChildOverride())!=null?d:c.getFirstChild();d!=null||g(0,2529);return h(a,d)}return h(a,c)}function j(a,c){__p&&__p();var d=a.getLeftSibling();if(d!=null)return i(a,d);d=a.getEnforceParent();if(b("SpatialNavTreeNodeUtils").isFocusTransparent(d)){var e=d.getLeftSibling();if(e!=null&&!l(a,c)){c=(c=e.getPrimaryChildOverride())!=null?c:e.getLastChild();c!=null||g(0,2529);return h(a,c)}return i(a,d.getLeftSibling())}return h(a,d)}function k(a,b){var c=a.getRightSibling(),d=a.getEnforceParent();return c!=null&&!l(a,b)?h(a,c):i(a,d.getRightSibling())}function l(a,c){var d=a.getEnforceParent(),e=a.getLeftSibling();return(c==="down"||c==="up")&&b("SpatialNavTreeNodeUtils").isFocusTransparent(d)&&e==null&&b("SpatialNavTreeNodeUtils").getRootNode(a)!=d}a={traverserName:"hierarchical",onLeft:function(a){a=a.currentNode;if(b("SpatialNavTreeNodeUtils").isPrimaryNode(a)){var c,d=a.getLeftSibling();if(d==null)return[];c=(c=(c=d.getPrimaryChildOverride())!=null?c:d.getLastChild())!=null?c:d;return h(a,c)}return j(a,"left")},onRight:function(a){a=a.currentNode;if(b("SpatialNavTreeNodeUtils").isPrimaryNode(a)){var c;c=(c=a.getPrimaryChildOverride())!=null?c:a.getFirstChild();return c==null?i(a,a.getRightSibling()):h(a,c)}return k(a,"right")},onUp:function(a){__p&&__p();var c=a.currentNode,d=a.config.wrapAround;a=function(a){if(a.length>0||d!==!0)return a;a=b("SpatialNavTreeNodeUtils").getLastHighlightableNode(b("SpatialNavTreeNodeUtils").getRootNode(c));return a==null?[]:h(c,a)};if(b("SpatialNavTreeNodeUtils").isPrimaryNode(c))return a(i(c,c.getLeftSibling()));if(b("SpatialNavTreeNodeUtils").isPrimaryOverrideChild(c)){var e=c.getEnforceParent();return a(i(c,e.getLeftSibling()))}return a(j(c,"up"))},onDown:function(a){__p&&__p();var c=a.currentNode,d=a.config.wrapAround;a=function(a){if(a.length>0||d!==!0)return a;a=b("SpatialNavTreeNodeUtils").getFirstHighlightableNode(b("SpatialNavTreeNodeUtils").getRootNode(c));return a==null?[]:h(c,a)};if(b("SpatialNavTreeNodeUtils").isPrimaryNode(c))return a(i(c,c.getRightSibling()));if(b("SpatialNavTreeNodeUtils").isPrimaryOverrideChild(c)){var e=c.getEnforceParent();return a(i(c,e.getRightSibling()))}return a(k(c,"down"))},onCenterSoftKey:function(a){__p&&__p();a=a.currentNode;if(b("SpatialNavTreeNodeUtils").shouldSwallowClick(a))return[];var c=a.getChildren();if(c.length===0)return[{mutationType:b("SpatialNavMutationSpecTypes").INTERACT_WITH_NODE,node:a}];if(c.length===1&&!b("SpatialNavTreeNodeUtils").shouldPreventClickThrough(a))return[{mutationType:b("SpatialNavMutationSpecTypes").INTERACT_WITH_NODE,node:c[0]}];c=(c=a.getPrimaryChildOverride())!=null?c:a.getFirstChild();c!=null||g(0,2529);return h(a,c)}};e.exports=a}),null); __d("HorizontalTraverser",["SpatialNavMutationSpecTypes"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function g(a){a.config.optionalCallback&&a.config.optionalCallback()}a={traverserName:"horizontal",onLeft:function(a){__p&&__p();var c=a.currentNode,d=c.getLeftSibling();if(d!=null)return[{mutationType:b("SpatialNavMutationSpecTypes").MOVE_TO_NODE,currentNode:c,nextNode:d}];if(a.config.wrapAround!==!0)return[];a=c.getParent();if(a==null)return[];d=a.getLastChild();return d==null?[]:[{mutationType:b("SpatialNavMutationSpecTypes").MOVE_TO_NODE,currentNode:c,nextNode:d}]},onUp:function(a){g(a);return[]},onRight:function(a){__p&&__p();var c=a.currentNode,d=c.getRightSibling();if(d!=null)return[{mutationType:b("SpatialNavMutationSpecTypes").MOVE_TO_NODE,currentNode:c,nextNode:d}];if(a.config.wrapAround!==!0)return[];a=c.getParent();if(a==null)return[];d=a.getFirstChild();return d==null?[]:[{mutationType:b("SpatialNavMutationSpecTypes").MOVE_TO_NODE,currentNode:c,nextNode:d}]},onDown:function(a){g(a);return[]},onCenterSoftKey:function(a){return[{mutationType:b("SpatialNavMutationSpecTypes").INTERACT_WITH_NODE,node:a.currentNode}]}};e.exports=a}),null); __d("LinearTraverser",["SpatialNavMutationSpecTypes","TraverserUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("TraverserUtils").getSingleMoveToNodeMutation;function h(a){var b;a=a.getLeftSibling();return a==null?null:(b=a.getLastChild())!=null?b:a}function i(a){var b;a=a.getRightSibling();return a==null?null:(b=a.getFirstChild())!=null?b:a}var j={traverserName:"linear",onLeft:function(a){a=a.currentNode;var b=h(a);if(b!=null)return g(a,b);b=a.getParent();if(b==null||b.getParent()==null)return[];b=h(b);return b==null?[]:g(a,b)},onUp:function(a){return j.onLeft(a)},onRight:function(a){a=a.currentNode;var b=i(a);if(b!=null)return g(a,b);b=a.getParent();if(b==null||b.getParent()==null)return[];b=i(b);return b==null?[]:g(a,b)},onDown:function(a){return j.onRight(a)},onCenterSoftKey:function(a){return[{mutationType:b("SpatialNavMutationSpecTypes").INTERACT_WITH_NODE,node:a.currentNode}]}};e.exports=j}),null); __d("SpatialNavControllerUtils",["cx","CSS","HierarchicalTraverser","HorizontalTraverser","LinearTraverser","SpatialNavControllerTypes"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("SpatialNavControllerTypes").SpatialNavContextState;a={getContextFromState:function(a,b){if(b!=null)return this._getContextFromStateImpl(a,b);else return this._getContextFromStateImpl(a,a.contextState)},getStackContextFromState:function(a){a=a.contextStack;return a.length!==0?a[a.length-1]:null},_getContextFromStateImpl:function(a,b){if(b===h.MENU_CONTEXT&&a.menuContext!=null)return a.menuContext;return b===h.CONTEXT_STACK?this.getStackContextFromState(a):null},shouldInterceptBackKey:function(a){return!1},isBottomSheetFlyout:function(a){return a.config.contextSigil==="share-popup"||a.config.contextSigil==="story-popup-context-init"||a.config.contextSigil==="story-popup-context"},getTraverserFromType:function(a){switch(a){case"linear":return b("LinearTraverser");case"horizontal":return b("HorizontalTraverser");case"hierarchical":default:return b("HierarchicalTraverser")}},updateSoftkeyTray:function(a){a=new CustomEvent("m:kaios:spatialnav:update_tray",a);window.dispatchEvent(a)}};e.exports=a}),null); __d("SpatialNavScrollUtils",["MViewport","SpatialNavTreeNodeUtils","Vector"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=20,h=.25,i=50;function j(a){var c=a.getVScrollParent();return c!=null?function(a){c.scrollTop=a}:function(a){b("MViewport").scrollTo(0,a)}}function k(a,c){var d=a.getVScrollParent(),e=d?d.offsetHeight:b("MViewport").getHeight(),f=d?d.scrollTop:b("MViewport").getScrollTop();d=d?b("Vector").getPos(d).y:0;var g=j(a),i=a.getHTMLElement();d=b("Vector").getPos(i).y-d;i=i.offsetHeight;var k=d+i,l=Math.ceil(e*h);c.scrollToTopOnFirst===!0&&b("SpatialNavTreeNodeUtils").isFirstNode(a)?g(0):df+e-l&&(ee+d-g&&(da},scrollDownInTheSameNodeBySmallIncrement:function(){b("MViewport").scrollBy(0,i)},isVScrollParent:function(a){a=window.getComputedStyle(a);return a.overflow==="auto"||a.overflow==="scroll"||a.overflowY==="auto"||a.overflowY==="scroll"},isHScrollParent:function(a){a=window.getComputedStyle(a);return a.overflow==="auto"||a.overflow==="scroll"||a.overflowX==="auto"||a.overflowX==="scroll"}};e.exports=a}),null); __d("MutationUtils",["cx","DataStore","KaiOSHTMLElementUtils","SpatialNavControllerTypes","SpatialNavControllerUtils","SpatialNavScrollUtils","SpatialNavTreeNodeUtils"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h=b("SpatialNavControllerTypes").SpatialNavContextState;function i(a){return b("KaiOSHTMLElementUtils").isTextfieldInput(a)||b("KaiOSHTMLElementUtils").isLink(a)||b("KaiOSHTMLElementUtils").isNTElement(a)||b("KaiOSHTMLElementUtils").isFileUploadElement(a)||a.hasAttribute("data-kaios-focus-on-highlight")}var j={SPATIAL_NAV_ELEMENT_FOCUS_KEY:"spatial_nav_element_focus_key",maybeFocusNode:function(a){a=a.getHTMLElement();i(a)&&j.focusAndTagElement(a)},focusAndTagElement:function(a){b("DataStore").set(a,j.SPATIAL_NAV_ELEMENT_FOCUS_KEY,!0),a.focus()},unhighlightNode:function(a){var c=b("SpatialNavTreeNodeUtils").getStyledHTMLElement(a);c.classList.remove("_6-_f");b("SpatialNavTreeNodeUtils").isPrimaryNode(a)&&!b("SpatialNavTreeNodeUtils").isFocusTransparent(a)&&c.classList.remove("_79wz")},unhighlightStackContext:function(a){a=b("SpatialNavControllerUtils").getStackContextFromState(a);if(a==null)return;a=a.currentNode;a.getHTMLElement().blur();j.unhighlightNode(a)},highlightNode:function(a){var c=b("SpatialNavTreeNodeUtils").getStyledHTMLElement(a);c.classList.add("_6-_f");b("SpatialNavTreeNodeUtils").isPrimaryNode(a)&&!b("SpatialNavTreeNodeUtils").isFocusTransparent(a)&&c.classList.add("_79wz")},moveToNewNode:function(a,c,d){b("SpatialNavScrollUtils").scrollToNodeIfNecessary(c,d);d=a.getHTMLElement();d!==c.getHTMLElement()&&(a.getHTMLElement().blur(),j.maybeFocusNode(c),j.unhighlightNode(a),j.highlightNode(c))},getNewControllerState:function(a,c){__p&&__p();if(a.contextState===h.MENU_CONTEXT&&a.menuContext!=null){var d={traverser:a.menuContext.traverser,currentNode:c,config:a.menuContext.config,mutationObserver:a.menuContext.mutationObserver};return{contextStack:a.contextStack,menuContext:d,contextState:a.contextState}}d=b("SpatialNavControllerUtils").getStackContextFromState(a);if(d==null)return a;c={traverser:d.traverser,currentNode:c,config:d.config,mutationObserver:d.mutationObserver};d=[].concat(a.contextStack);d.splice(-1,1,c);return{contextStack:d,menuContext:a.menuContext,contextState:a.contextState}}};e.exports=j}),null); __d("HierarchicalTreeOptimizer",["SpatialNavTreeNodeUtils"],(function(a,b,c,d,e,f){"use strict";a={validateTreeStructure:function(a){a=b("SpatialNavTreeNodeUtils").getRootNode(a);var c=a.getChildren();c.forEach(function(a,b){a.hasChildren()||c.splice(b,1)})}};e.exports=a}),null); __d("SpatialNavTreeNode",["invariant"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();a=function(){__p&&__p();function a(a){this.$1=a,this.$2=[],this.$3=null}var b=a.prototype;b.getHTMLElement=function(){return this.$1};b.addChild=function(a){this.$2.push(a),a.setParent(this)};b.getChildren=function(){return this.$2};b.removeChild=function(a){a=this.$2.indexOf(a);a!==-1&&this.$2.splice(a,1)};b.insertChildren=function(a,b){var c;(c=this.$2).splice.apply(c,[a,0].concat(b))};b.setParent=function(a){this.$3=a};b.getParent=function(){return this.$3};b.getEnforceParent=function(){this.$3!=null||g(0,12374);return this.$3};b.hasChildren=function(){return this.$2.length!==0};b.setVScrollParent=function(a){this.$4=a};b.getVScrollParent=function(){return this.$4};b.setHScrollParent=function(a){this.$5=a};b.getHScrollParent=function(){return this.$5};b.setPrimaryChildOverride=function(a){this.$6=a};b.getPrimaryChildOverride=function(){return this.$6};b.getLeftSibling=function(){if(this.$3==null)return null;var a=this.$3.getChildren(),b=a.indexOf(this);return b===-1||b===0?null:a[b-1]};b.getRightSibling=function(){if(this.$3==null)return null;var a=this.$3.getChildren(),b=a.indexOf(this);return b===-1||b===a.length-1?null:a[b+1]};b.getFirstChild=function(){return this.$2.length===0?null:this.$2[0]};b.getLastChild=function(){return this.$2.length===0?null:this.$2[this.$2.length-1]};return a}();e.exports=a}),null); __d("SpatialNavTreeBuilder",["Event","KaiOSHTMLElementUtils","SpatialNavScrollUtils","SpatialNavTreeNode","SpatialNavTreeNodeUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={buildSpatialNavTree:function(a,c,d){__p&&__p();var e=new(b("SpatialNavTreeNode"))(a);d=a.hasAttribute("data-kaios-scroll-parent")&&b("SpatialNavScrollUtils").isVScrollParent(a)?a:d;c=a.hasAttribute("data-kaios-scroll-parent")&&b("SpatialNavScrollUtils").isHScrollParent(a)?a:c;var f=[{element:a,parentNode:e,vScrollParent:d,hScrollParent:c}],g=new Set(),h,i,j,k=function(){__p&&__p();a=f.pop();var e=a.element;d=a.parentNode;c=a.vScrollParent;j=a.hScrollParent;if(e.hasAttribute("data-kaios-blacklist-nav"))return"continue";i=b("KaiOSHTMLElementUtils").isSpatialNavElement(e)?new(b("SpatialNavTreeNode"))(e):null;i!=null&&(b("SpatialNavTreeNodeUtils").isPrimaryNode(i)&&b("SpatialNavTreeNodeUtils").isPrimaryNode(d)&&g.add(d),i.setParent(d),d.addChild(i),d=i,c!=null&&i.setVScrollParent(c),j!=null&&i.setHScrollParent(j),e.hasAttribute("data-kaios-file-upload-element")&&b("Event").listen(e,"keypress",function(a){a.key==="Enter"&&e.click()}));e.hasAttribute("data-kaios-scroll-parent")&&(c=b("SpatialNavScrollUtils").isVScrollParent(e)?e:c,j=b("SpatialNavScrollUtils").isHScrollParent(e)?e:j);if(i!=null&&!b("SpatialNavTreeNodeUtils").isPrimaryNode(i))return"continue";h=e.children;for(var k=e.childElementCount-1;k>=0;k--)f.push({element:h[k],parentNode:d,vScrollParent:c,hScrollParent:j})};while(f.length!==0){var l=k();if(l==="continue")continue}g.forEach(function(a){__p&&__p();var b=a.getParent();if(b==null)return;var c=b.getChildren().indexOf(a);if(c===-1)return;var d=a.getChildren();for(var e=0;e=e.length)break;h=e[f++]}else{f=e.next();if(f.done)break;h=f.value}h=h;h.mutationObserver!=null&&h.mutationObserver.release()}h=c.newContextState!=null?c.newContextState:a.menuContext==null?g.NO_CONTEXT:g.MENU_CONTEXT;return{contextStack:[],menuContext:a.menuContext,contextState:h}}return a}};e.exports=a}),null); __d("HighlightNodeMutation",["MutationUtils","SpatialNavControllerUtils","SpatialNavScrollUtils","SpatialNavTreeNodeUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={mutateState:function(a,c){__p&&__p();var d=b("SpatialNavControllerUtils").getContextFromState(a);if(d==null)return a;var e=d.currentNode;c=c.targetElement;if(e.getHTMLElement()===c)return a;c=b("SpatialNavTreeNodeUtils").findNodeForElement(c,b("SpatialNavTreeNodeUtils").getRootNode(e));if(c==null)return a;b("SpatialNavScrollUtils").scrollToNodeIfNecessary(c,d.config);e&&(e.getHTMLElement().blur(),b("MutationUtils").unhighlightNode(e));b("MutationUtils").maybeFocusNode(c);b("MutationUtils").highlightNode(c);return b("MutationUtils").getNewControllerState(a,c)}};e.exports=a}),null); __d("InteractWithNodeMutation",["KaiOSHTMLElementUtils","MutationUtils","SpatialNavTreeNodeUtils","getActiveElement"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function g(a){return a instanceof HTMLSelectElement||a instanceof HTMLInputElement&&a.type==="date"}a={mutateState:function(a,c){var d=c.node.getHTMLElement();g(d)&&b("MutationUtils").focusAndTagElement(d);b("KaiOSHTMLElementUtils").isTextfieldInput(d)&&b("getActiveElement")(document)!==d&&b("MutationUtils").focusAndTagElement(d);if(b("SpatialNavTreeNodeUtils").shouldClickChildInstead(c.node)){c=b("KaiOSHTMLElementUtils").getFirstLink(d);c!=null&&c.click()}else d.click();return a}};e.exports=a}),null); __d("MoveToNodeMutation",["MutationUtils","SpatialNavControllerUtils","SpatialNavScrollUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={mutateState:function(a,c){__p&&__p();var d=c.currentNode;c=c.nextNode;var e=b("SpatialNavControllerUtils").getContextFromState(a);if(e==null)return a;b("SpatialNavScrollUtils").scrollToNodeIfNecessary(c,e.config);d.getHTMLElement().blur();b("MutationUtils").maybeFocusNode(c);b("MutationUtils").unhighlightNode(d);b("MutationUtils").highlightNode(c);return b("MutationUtils").getNewControllerState(a,c)}};e.exports=a}),null); __d("PopContextMutation",["MutationUtils","SpatialNavControllerTypes","SpatialNavControllerUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("SpatialNavControllerTypes").SpatialNavContextState;a={mutateState:function(a){b("MutationUtils").unhighlightStackContext(a);var c=a.contextStack.length<=1&&a.contextState===g.CONTEXT_STACK?g.NO_CONTEXT:a.contextState,d=a.contextStack.length;if(c===g.CONTEXT_STACK&&d>=2){d=a.contextStack[d-2].currentNode;b("MutationUtils").highlightNode(d)}d=b("SpatialNavControllerUtils").getStackContextFromState(a);d!=null&&d.mutationObserver!=null&&d.mutationObserver.release();return{contextStack:a.contextStack.slice(0,-1),menuContext:a.menuContext,contextState:c}}};e.exports=a}),null); __d("SpatialNavDOMMutationObserver",["SpatialNavMutationSpecTypes"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g={attributes:!0,attributeFilter:["style"],attributeOldValue:!0,childList:!0,subtree:!0},h=new RegExp(/display:\s*none/);a=function(){__p&&__p();function a(a,c,d,e){__p&&__p();var f=this;this.$5=function(a){__p&&__p();var c=f.$2,d=f.$3,e=f.$4;if(c==null||d==null)return;var g=[];for(var a=a,h=Array.isArray(a),i=0,a=h?a:a[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var j;if(h){if(i>=a.length)break;j=a[i++]}else{i=a.next();if(i.done)break;j=i.value}j=j;var k=j.target;if(!(k instanceof HTMLElement))continue;if(j.type==="attributes"){if(f.$6(j))g.push({domMutationType:"ADD",addedElement:k});else if(f.$7(j)){var l=k.parentNode;l instanceof HTMLElement&&g.push({domMutationType:"REMOVE",removedElement:k,removedElementParent:l})}}else if(j.type==="childList"){for(var l=j.removedNodes,m=Array.isArray(l),n=0,l=m?l:l[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var o;if(m){if(n>=l.length)break;o=l[n++]}else{n=l.next();if(n.done)break;o=n.value}o=o;o instanceof HTMLElement&&g.push({domMutationType:"REMOVE",removedElement:o,removedElementParent:k})}for(var o=j.addedNodes,n=Array.isArray(o),m=0,o=n?o:o[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){if(n){if(m>=o.length)break;l=o[m++]}else{m=o.next();if(m.done)break;l=m.value}k=l;k instanceof HTMLElement&&g.push({domMutationType:"ADD",addedElement:k})}}}g.length!==0&&d([{mutationType:b("SpatialNavMutationSpecTypes").REBUILD_PARTIAL_TREE,pathType:c,domMutations:g,highlightNext:e}])};this.$2=c;this.$3=d;this.$4=e;this.$1=new MutationObserver(this.$5);this.$1.observe(a,g)}var c=a.prototype;c.release=function(){this.$1!=null&&this.$1.disconnect(),this.$1=null,this.$2=null,this.$3=null};c.$6=function(a){var b=a.oldValue;a=a.target;return b!=null&&h.test(b)&&a instanceof HTMLElement&&a.style.display===""};c.$7=function(a){var b=a.oldValue;a=a.target;return(b==null||!h.test(b))&&a instanceof HTMLElement&&a.style.display==="none"};return a}();e.exports=a}),null); __d("PushContextMutation",["HierarchicalTreeOptimizer","MutationUtils","SpatialNavControllerTypes","SpatialNavControllerUtils","SpatialNavDOMMutationObserver","SpatialNavScrollUtils","SpatialNavTreeBuilder","SpatialNavTreeNodeUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("SpatialNavControllerTypes").SpatialNavContextState;function h(a,c,d){b("SpatialNavScrollUtils").scrollToNodeIfNecessary(c,d);d=b("SpatialNavControllerUtils").getStackContextFromState(a);d!=null&&d.currentNode.getHTMLElement().blur();b("MutationUtils").maybeFocusNode(c);b("MutationUtils").highlightNode(c)}a={mutateState:function(a,c){__p&&__p();var d=b("SpatialNavTreeBuilder").buildSpatialNavTree(c.rootElement);if(d==null)return a;var e=null;c.config.focusMenuElementOnFirst!=null&&(e=b("SpatialNavTreeNodeUtils").findMenuNodeFromElement(c.config.focusMenuElementOnFirst,d));e==null&&(e=c.config.pathType===1||c.config.pathType===5||c.config.pathType===8?b("SpatialNavTreeNodeUtils").getFirstHighlightableNode(d):b("SpatialNavTreeNodeUtils").getFirstHighlightableNodeInViewport(d));if(e==null)return a;var f=g.CONTEXT_STACK;a.contextState===g.MENU_CONTEXT&&a.menuContext!=null&&b("SpatialNavTreeNodeUtils").getRootNode(a.menuContext.currentNode).getHTMLElement()!==c.rootElement?f=g.MENU_CONTEXT:(b("MutationUtils").unhighlightStackContext(a),h(a,e,c.config));c.traverser.traverserName==="hierarchical"&&c.config.validateTree===!0&&b("HierarchicalTreeOptimizer").validateTreeStructure(d);d=null;c.config.observeDOMChanges===!0&&(d=new(b("SpatialNavDOMMutationObserver"))(c.rootElement,c.config.pathType,c.stateUpdateFunction,c.config.highlightNext));var i={detail:{centerButtonText:""}};b("SpatialNavControllerUtils").updateSoftkeyTray(i);return{contextStack:[].concat(a.contextStack,[{currentNode:e,traverser:c.traverser,config:c.config,mutationObserver:d}]),menuContext:a.menuContext,contextState:f}}};e.exports=a}),null); __d("SpatialNavTreeUpdater",["KaiOSHTMLElementUtils","SpatialNavScrollUtils","SpatialNavTreeBuilder","SpatialNavTreeNodeUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();function g(a,c){c=c.parentNode;a=a.getHTMLElement().parentNode;var d=null,e=null;while(c!=null&&c!==a&&c!==document&&c instanceof HTMLElement&&(d==null||e==null))c.hasAttribute("data-kaios-scroll-parent")&&(d==null&&(d=b("SpatialNavScrollUtils").isVScrollParent(c)?c:null),e==null&&(e=b("SpatialNavScrollUtils").isHScrollParent(c)?c:null)),c=c.parentNode;return{hScrollParent:e,vScrollParent:d}}function h(a,c){__p&&__p();a=g(a,c);c=b("SpatialNavTreeBuilder").buildSpatialNavTree(c,a.hScrollParent,a.vScrollParent);a=[];for(var c=c.getChildren(),d=Array.isArray(c),e=0,c=d?c:c[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var f;if(d){if(e>=c.length)break;f=c[e++]}else{e=c.next();if(e.done)break;f=e.value}f=f;f.setParent(null);a.push(f)}return a}function i(a,c){c=c;while(c!=null&&c!==document&&c instanceof HTMLElement){if(c===a.getHTMLElement()&&b("KaiOSHTMLElementUtils").isVisible(c)||b("KaiOSHTMLElementUtils").isSpatialNavElement(c))return b("SpatialNavTreeNodeUtils").findNodeForElement(c,a);c=c.parentNode}return null}a={maybeAddNodes:function(a,b){__p&&__p();var c=h(a,b);if(c.length===0)return[];a=i(a,b.parentNode);if(a==null)return[];var d=a.getChildren(),e;for(e=0;e=f.length)break;e=f[d++]}else{d=f.next();if(d.done)break;e=d.value}e=e;e.setParent(a)}return c},maybeRemoveNodes:function(a,c,d,e){__p&&__p();a=i(a,d);d={removedNodes:[],removedCurrentNode:!1,closestPrevNode:null,closestNextNode:null};if(a==null)return d;a=a.getChildren();var f=0,g;for(g=0;g=0;c--){var d=a[c];if(d.config.pathType===b)return d}return null}function h(a,c){if(c==null)return b("SpatialNavTreeNodeUtils").getFirstHighlightableNode(a);else{a=b("SpatialNavTreeNodeUtils").getNextNodeFiltered(c,function(a){return!b("SpatialNavTreeNodeUtils").isFocusTransparent(a)});return(a=a)!=null?a:c}}a={mutateState:function(a,c){__p&&__p();var d=g(a,c.pathType);if(d==null)return a;var e=b("SpatialNavTreeNodeUtils").getRootNode(d.currentNode),f=!1,i=null,j=null;for(var k=c.domMutations,l=Array.isArray(k),m=0,k=l?k:k[typeof Symbol==="function"?Symbol.iterator:"@@iterator"]();;){var n;if(l){if(m>=k.length)break;n=k[m++]}else{m=k.next();if(m.done)break;n=m.value}n=n;switch(n.domMutationType){case"ADD":b("SpatialNavTreeUpdater").maybeAddNodes(e,n.addedElement);break;case"REMOVE":n=b("SpatialNavTreeUpdater").maybeRemoveNodes(e,n.removedElement,n.removedElementParent,d.currentNode);n.removedCurrentNode&&(i=n.closestPrevNode,j=n.closestNextNode,f=!0);break;default:}}if(!f)return a;n=null;c.highlightNext===!0&&j!==null?n=j:n=h(e,i);m=a.contextStack;l=m.indexOf(d);if(l===-1||n==null)return a;k=d.currentNode;b("MutationUtils").moveToNewNode(k,n,d.config);f=k.getParent();if(f!=null&&f.getPrimaryChildOverride()===k){c=n.getParent()===f?n:null;f.setPrimaryChildOverride(c)}d.traverser.traverserName==="hierarchical"&&d.config.validateTree===!0&&b("HierarchicalTreeOptimizer").validateTreeStructure(e);j=[].concat(m.slice(0,l),[babelHelpers["extends"]({},d,{currentNode:n})],m.slice(l+1));return babelHelpers["extends"]({},a,{contextStack:j})}};e.exports=a}),null); __d("RemoveContextMutation",["MutationUtils","SpatialNavControllerTypes","SpatialNavTreeNodeUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("SpatialNavControllerTypes").SpatialNavContextState;a={mutateState:function(a,c){__p&&__p();if(a.contextStack==null||a.contextStack.length===0)return a;for(var d=a.contextStack.length-1;d>=0;d--){var e=a.contextStack[d],f=e.currentNode,h=b("SpatialNavTreeNodeUtils").getRootNode(f).getHTMLElement(),i=a.contextStack[d].config.pathType;if(h===c.rootElement||i===c.pathType){f.getHTMLElement().blur();b("MutationUtils").unhighlightNode(f);h=a.contextStack.length===1&&a.contextState===g.CONTEXT_STACK?g.NO_CONTEXT:a.contextState;e.mutationObserver!=null&&e.mutationObserver.release();return{contextStack:a.contextStack.slice(0,d).concat(a.contextStack.slice(d+1)),menuContext:a.menuContext,contextState:h}}}return a}};e.exports=a}),null); __d("SwitchContextMutation",["MutationUtils","SpatialNavControllerTypes","SpatialNavControllerUtils","SpatialNavScrollUtils"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("SpatialNavControllerTypes").SpatialNavContextState;a={mutateState:function(a,c){__p&&__p();if(a.contextState===c.switchToContextState)return a;var d={contextStack:a.contextStack,menuContext:a.menuContext,contextState:c.switchToContextState},e=b("SpatialNavControllerUtils").getContextFromState(d);if(c.switchToContextState!==g.NO_CONTEXT&&e==null)return a;a=c.currentNode;a!=null&&(a.getHTMLElement().blur(),b("MutationUtils").unhighlightNode(a));if(e!=null){a=c.nextNode!=null?c.nextNode:e.currentNode;b("SpatialNavScrollUtils").scrollToNodeIfNecessary(a,e.config);b("MutationUtils").maybeFocusNode(a);b("MutationUtils").highlightNode(a);d=b("MutationUtils").getNewControllerState(d,a)}return d}};e.exports=a}),null); __d("SpatialNavMutator",["BuildMenuMutation","ClearContextMutation","HighlightNodeMutation","InteractWithNodeMutation","MoveToNodeMutation","PopContextMutation","PushContextMutation","RebuildPartialTreeMutation","RebuildTreeMutation","RemoveContextMutation","SpatialNavMutationSpecTypes","SwitchContextMutation"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g=b("RebuildTreeMutation").RebuildTreeMutation,h={mutateState:function(a,b){var c=a;b.forEach(function(a){c=h._applyMutation(c,a)});return c},_applyMutation:function(a,c){__p&&__p();switch(c.mutationType){case b("SpatialNavMutationSpecTypes").PUSH_CONTEXT:return b("PushContextMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").POP_CONTEXT:return b("PopContextMutation").mutateState(a);case b("SpatialNavMutationSpecTypes").MOVE_TO_NODE:return b("MoveToNodeMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").INTERACT_WITH_NODE:return b("InteractWithNodeMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").REBUILD_TREE:return g.mutateState(a,c);case b("SpatialNavMutationSpecTypes").BUILD_MENU:return b("BuildMenuMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").HIGHLIGHT_NODE:return b("HighlightNodeMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").SWITCH_CONTEXT:return b("SwitchContextMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").CLEAR_CONTEXT:return b("ClearContextMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").REMOVE_CONTEXT:return b("RemoveContextMutation").mutateState(a,c);case b("SpatialNavMutationSpecTypes").REBUILD_PARTIAL_TREE:return b("RebuildPartialTreeMutation").mutateState(a,c);default:return a}}};e.exports=h}),null); __d("KaiOSSpatialNavPath",[],(function(a,b,c,d,e,f){e.exports=Object.freeze({NONE:0,BOTTOM_SHEET:1,CONTACT_IMPORTER:2,CONFIRMATION:3,FRIENDS_TAB:4,LIKE_REACTION_FLYOUT:5,LOGIN_PAGE:6,MENU:7,MOVERLAY:8,NEWSFEED:9,NOTIFICATION:10,NUX_FRIENDS_SUGGESTION:11,PHOTO:12,PLAYGROUND:13,PLAYGROUND_VISIBILITY:14,REGISTRATION:15,STORY:16,TEST:17,NUX_PROFILE_PIC_PAGE:18,SAVE_DEVICE_PAGE:19,ACCOUNT_SWITCHER:20})}),null); __d("SpatialNavPathUtils",["KaiOSSpatialNavPath","URI"],(function(a,b,c,d,e,f){"use strict";var g,h=Object.freeze({"/":9,"/kaiosapp/jio/home":9,"/kaiosapp/jio/home/startup":9,"/home.php":9,"/index.php":9,"/friends/center/kaios":4,"/notifications.php":10,"/kaiosapp/playground":13,"/kaiosapp/playground/visibility":14,"/login/save-device":19});a={getSpatialNavPathType:function(a){a=new(g||(g=b("URI")))(a).getPath();a.length>1&&a[a.length-1]==="/"&&(a=a.slice(0,a.length-1));return h[a]!=null?h[a]:0}};e.exports=a}),null); __d("SpatialNavController",["fbt","Promise","regeneratorRuntime","DataStore","KaiOSConnectionHelper","KaiOSSendMessageUtil","MFlyout","MOverlay","MutationUtils","RebuildTreeMutation","SpatialNavControllerUtils","SpatialNavMutationSpecTypes","SpatialNavMutator","SpatialNavPathUtils","SpatialNavScrollUtils","SpatialNavTreeNodeUtils","Stratcom","SubscriptionsHandler","URI","promiseDone","SpatialNavControllerTypes"],(function(a,b,c,d,e,f,g){"use strict";__p&&__p();var h,i=b("RebuildTreeMutation").RebuildHighlightConfig,j=new Map([["nav_mode","spatial"]]),k=new Map([["nav_mode","cursor"]]),l=b("SpatialNavControllerTypes").SpatialNavContextState;a=function(){__p&&__p();function a(){__p&&__p();var a=this;this.$1=!1;this.$3=null;this.$4=null;this.$5=!1;this.$9=function(c,d){d===void 0&&(d=!1),b("promiseDone")(b("Promise").resolve().then(function(a){var c=this;this.$2=b("SpatialNavMutator").mutateState(this.$2,a);a.forEach(function(a){a.mutationType===b("SpatialNavMutationSpecTypes").PUSH_CONTEXT&&b("Stratcom").invoke("m:kaios:spatialnav:init_complete"),c.$12(a,c.$2)&&d&&c.enableSpatialNav()})}.bind(a,c)))};this.$2={contextStack:[],menuContext:null,contextState:l.NO_CONTEXT}}var c=a.prototype;c.enableSpatialNav=function(){this.$6(j),this.$1=!0,this.$7(),this.$8()};c.disableSpatialNav=function(a){__p&&__p();var c;return b("regeneratorRuntime").async(function(d){while(1)switch(d.prev=d.next){case 0:this.$6(k);this.$1=!1;this.$3!=null&&this.$3.release();d.next=5;return b("regeneratorRuntime").awrap(this.getCurrentState());case 5:c=d.sent,a&&this.clearContext(c.contextState,l.NO_CONTEXT);case 7:case"end":return d.stop()}},null,this)};c.disableSpatialNavForAll=function(){this.disableSpatialNav(!1),this.clearContext(l.MENU_CONTEXT),this.clearContext(l.CONTEXT_STACK)};c.isSpatialNavEnabled=function(){return this.$1};c.setupNavOnContainer=function(a,c,d){d===void 0&&(d=!1);var e=b("SpatialNavControllerUtils").getTraverserFromType(c.traverserType);c.isMenu===!0?this.$9([{mutationType:b("SpatialNavMutationSpecTypes").BUILD_MENU,rootElement:a,traverser:e,config:c}],d):this.$9([{mutationType:b("SpatialNavMutationSpecTypes").PUSH_CONTEXT,rootElement:a,traverser:e,config:c,stateUpdateFunction:this.$9}],d)};c.$6=function(a){b("KaiOSSendMessageUtil").postMessage(b("KaiOSConnectionHelper").hostWindow,b("KaiOSSendMessageUtil").Type.TOGGLE_SPATIAL_NAV,a)};c.rebuildSpatialNavTree=function(a){this.$9([{mutationType:b("SpatialNavMutationSpecTypes").REBUILD_TREE,highlightConfig:a}])};c.handleFocusChange=function(a){if(b("DataStore").get(a,b("MutationUtils").SPATIAL_NAV_ELEMENT_FOCUS_KEY,!1)){b("DataStore").remove(a,b("MutationUtils").SPATIAL_NAV_ELEMENT_FOCUS_KEY);return}this.$9([{mutationType:b("SpatialNavMutationSpecTypes").HIGHLIGHT_NODE,targetElement:a}])};c.getCurrentState=function(){var a=this;return b("regeneratorRuntime").async(function(c){while(1)switch(c.prev=c.next){case 0:return c.abrupt("return",b("Promise").resolve().then(function(){return a.$2}));case 1:case"end":return c.stop()}},null,this)};c.$10=function(){var a;return b("regeneratorRuntime").async(function(c){while(1)switch(c.prev=c.next){case 0:c.next=2;return b("regeneratorRuntime").awrap(this.getCurrentState());case 2:a=c.sent;return c.abrupt("return",b("SpatialNavControllerUtils").getContextFromState(a));case 4:case"end":return c.stop()}},null,this)};c.getCurrentStackContext=function(){var a;return b("regeneratorRuntime").async(function(c){while(1)switch(c.prev=c.next){case 0:c.next=2;return b("regeneratorRuntime").awrap(this.getCurrentState());case 2:a=c.sent;return c.abrupt("return",b("SpatialNavControllerUtils").getContextFromState(a,l.CONTEXT_STACK));case 4:case"end":return c.stop()}},null,this)};c.getCurrentContextState=function(){var a;return b("regeneratorRuntime").async(function(c){while(1)switch(c.prev=c.next){case 0:c.next=2;return b("regeneratorRuntime").awrap(this.getCurrentState());case 2:a=c.sent;return c.abrupt("return",a.contextState);case 4:case"end":return c.stop()}},null,this)};c.handleKeyDown=function(a){__p&&__p();var c,d,e,f,g;return b("regeneratorRuntime").async(function(h){__p&&__p();while(1)switch(h.prev=h.next){case 0:h.next=2;return b("regeneratorRuntime").awrap(this.getCurrentState());case 2:c=h.sent;d=b("SpatialNavControllerUtils").getContextFromState(c);if(!(d==null)){h.next=6;break}return h.abrupt("return");case 6:e=null;h.t0=a.key;h.next=h.t0==="ArrowLeft"?10:h.t0==="ArrowRight"?12:h.t0==="ArrowUp"?14:h.t0==="ArrowDown"?19:h.t0==="Enter"?24:26;break;case 10:e=d.traverser.onLeft;return h.abrupt("break",26);case 12:e=d.traverser.onRight;return h.abrupt("break",26);case 14:if(!b("SpatialNavScrollUtils").shouldScrollUpInTheSameNode(d.currentNode)){h.next=17;break}b("SpatialNavScrollUtils").scrollUpInTheSameNodeBySmallIncrement();return h.abrupt("return");case 17:e=d.traverser.onUp;return h.abrupt("break",26);case 19:if(!b("SpatialNavScrollUtils").shouldScrollDownInTheSameNode(d.currentNode)){h.next=22;break}b("SpatialNavScrollUtils").scrollDownInTheSameNodeBySmallIncrement();return h.abrupt("return");case 22:e=d.traverser.onDown;return h.abrupt("break",26);case 24:e=d.traverser.onCenterSoftKey;return h.abrupt("break",26);case 26:if(!(e!=null)){h.next=36;break}f=e(d);if(!(f.length!==0)){h.next=32;break}this.$9(f);h.next=36;break;case 32:h.next=34;return b("regeneratorRuntime").awrap(this.$11(c,a.key));case 34:g=h.sent,g.length!==0&&this.$9(g);case 36:case"end":return h.stop()}},null,this)};c.popContext=function(){this.$9([{mutationType:b("SpatialNavMutationSpecTypes").POP_CONTEXT}])};c.removeContextByElement=function(a){this.$9([{mutationType:b("SpatialNavMutationSpecTypes").REMOVE_CONTEXT,rootElement:a}])};c.removeContextByPath=function(a){this.$9([{mutationType:b("SpatialNavMutationSpecTypes").REMOVE_CONTEXT,pathType:a}])};c.clearContext=function(a,c){this.$9([{mutationType:b("SpatialNavMutationSpecTypes").CLEAR_CONTEXT,contextStateToClear:a,newContextState:c}])};c.switchContext=function(a,c,d){__p&&__p();var e;return b("regeneratorRuntime").async(function(f){__p&&__p();while(1)switch(f.prev=f.next){case 0:f.next=2;return b("regeneratorRuntime").awrap(this.getCurrentState());case 2:e=f.sent;if(!(a===l.MENU_CONTEXT&&e.menuContext==null||a===l.CONTEXT_STACK&&e.contextStack.length===0)){f.next=5;break}return f.abrupt("return");case 5:this.$9([{mutationType:b("SpatialNavMutationSpecTypes").SWITCH_CONTEXT,switchToContextState:a,currentNode:c,nextNode:d}]);case 6:case"end":return f.stop()}},null,this)};c.$12=function(a,c){return a.mutationType===b("SpatialNavMutationSpecTypes").PUSH_CONTEXT||a.mutationType===b("SpatialNavMutationSpecTypes").BUILD_MENU&&c.contextState===l.MENU_CONTEXT};c.$11=function(a,c){__p&&__p();var d,e,f,g;return b("regeneratorRuntime").async(function(i){__p&&__p();while(1)switch(i.prev=i.next){case 0:d=a.menuContext;if(!(a.contextState===l.MENU_CONTEXT&&d!=null&&c==="ArrowDown")){i.next=20;break}e=location.href;if(!(e!=null)){i.next=10;break}f=new(h||(h=b("URI")))(e).getQueryData().soft;if(!(f==="search")){i.next=10;break}b("MutationUtils").unhighlightNode(d.currentNode);d.currentNode.getHTMLElement().blur();this.disableSpatialNav(!1);return i.abrupt("return",[]);case 10:if(!(a.contextStack.length!==0)){i.next=14;break}return i.abrupt("return",[{mutationType:b("SpatialNavMutationSpecTypes").SWITCH_CONTEXT,switchToContextState:l.CONTEXT_STACK,currentNode:d.currentNode}]);case 14:this.disableSpatialNav(!1);i.next=17;return b("regeneratorRuntime").awrap(this.switchContext(l.NO_CONTEXT,d.currentNode));case 17:return i.abrupt("return",[]);case 18:i.next=24;break;case 20:if(!(a.contextState===l.CONTEXT_STACK&&a.contextStack.length===1&&(c==="ArrowUp"||c==="ArrowLeft"))){i.next=24;break}if(!(d!=null)){i.next=24;break}g=b("SpatialNavTreeNodeUtils").getSelectedMenuNode(b("SpatialNavTreeNodeUtils").getRootNode(d.currentNode));return i.abrupt("return",[{mutationType:b("SpatialNavMutationSpecTypes").SWITCH_CONTEXT,switchToContextState:l.MENU_CONTEXT,currentNode:a.contextStack[a.contextStack.length-1].currentNode,nextNode:g}]);case 24:return i.abrupt("return",[]);case 25:case"end":return i.stop()}},null,this)};c.$7=function(){__p&&__p();var a=this;this.$3!=null&&this.$3.release();this.$3=new(b("SubscriptionsHandler"))();this.$3.addSubscriptions(b("Stratcom").listen(["m:kaios:spatialnav:refresh","m:more_item_automatic:items_loaded"],null,function(b){b=b.getData();Object.prototype.hasOwnProperty.call(i,b)||(b=null);a.rebuildSpatialNavTree(b)}),b("Stratcom").listen("Layer:show",null,function(c){__p&&__p();if(a.isSpatialNavEnabled()==!1)return;c=c.getData();if(c instanceof b("MOverlay"))a.setupNavOnContainer(c.getRoot(),{traverserType:"linear",pathType:8});else if(c instanceof b("MFlyout"))if(c.config.contextSigil==="like-reaction-flyout")a.setupNavOnContainer(c.getContentRoot(),{traverserType:"horizontal",pathType:5,optionalCallback:function(a){return function(){a.isShown()&&typeof a.hide==="function"&&a.hide()}}(c),wrapAround:!1});else if(b("SpatialNavControllerUtils").isBottomSheetFlyout(c)){c.getContentRoot().setAttribute("data-kaios-scroll-parent",!0);a.setupNavOnContainer(c.getContentRoot(),{traverserType:"linear",pathType:1,backKeyCallback:function(a){return function(){a.isShown()&&typeof a.hide==="function"&&a.hide()}}(c)});c=g._("Close");c={detail:{leftButtonText:c,leftButtonEvent:"close_bottom_sheet"}};b("SpatialNavControllerUtils").updateSoftkeyTray(c)}}),b("Stratcom").listen("m:layer:hide",null,function(a){__p&&__p();var c,d,e,f,g,h;return b("regeneratorRuntime").async(function(i){__p&&__p();while(1)switch(i.prev=i.next){case 0:c=a.getData();d=null;c instanceof b("MFlyout")?d=c.getContentRoot():c instanceof b("MOverlay")&&(d=c.getRoot());i.next=5;return b("regeneratorRuntime").awrap(this.getCurrentState());case 5:e=i.sent;f=b("SpatialNavControllerUtils").getStackContextFromState(e);if(!(f==null)){i.next=9;break}return i.abrupt("return");case 9:g=b("SpatialNavTreeNodeUtils").getRootNode(f.currentNode),c instanceof b("MOverlay")&&d===g.getHTMLElement()?this.popContext():c instanceof b("MFlyout")&&(d!==null&&d===g.getHTMLElement()&&(h=b("SpatialNavControllerUtils").isBottomSheetFlyout(c),(c.config.contextSigil==="like-reaction-flyout"||h)&&(this.popContext(),h&&b("Stratcom").invoke("m:kaios:spatialav:restore_tray"))));case 11:case"end":return i.stop()}},null,this)}.bind(this)),b("Stratcom").listen("m:kaios:spatialnav:navigate",null,function(b){a.handleKeyDown(b.getData())}))};c.$8=function(){if(this.$4!=null)return;this.$4=new(b("SubscriptionsHandler"))();this.$4.addSubscriptions(b("Stratcom").listen(["m:history:change","m:history:change-default"],null,this.$13.bind(this)),b("Stratcom").listen("m:page:unload",null,this.$14.bind(this)))};c.$13=function(a){__p&&__p();var c=this;return b("regeneratorRuntime").async(function(d){__p&&__p();while(1)switch(d.prev=d.next){case 0:return d.abrupt("return",b("Promise").resolve().then(function(){__p&&__p();c.$5&&(c.$5=!1,b("Stratcom").invoke("m:kaios:spatialav:restore_tray"));var d=a.getData();if(d.soft==="composer"||d.soft==="search"){c.disableSpatialNav(!1);if(d.soft==="search"){var e={detail:{rightButtonText:""}};b("SpatialNavControllerUtils").updateSoftkeyTray(e);c.$5=!0}return}e=c.$2;if(e.contextState===l.MENU_CONTEXT){c.$1||c.$15();return}var f=b("SpatialNavPathUtils").getSpatialNavPathType(d.path);if(d.soft==null&&e.contextStack!=null&&e.contextStack.length>0){d=e.contextStack[e.contextStack.length-1].config;d.pathType===1&&d.backKeyCallback?d.backKeyCallback():d.pathType===5&&d.optionalCallback&&d.optionalCallback();d.pathType===f?c.$1||c.$15():c.disableSpatialNav(!1)}}));case 1:case"end":return d.stop()}},null,this)};c.$14=function(a){a=a.getData();a=b("SpatialNavPathUtils").getSpatialNavPathType(a.path);a!==0&&this.removeContextByPath(a)};c.$15=function(){var a;return b("regeneratorRuntime").async(function(c){while(1)switch(c.prev=c.next){case 0:c.next=2;return b("regeneratorRuntime").awrap(this.$10());case 2:a=c.sent,a&&(this.enableSpatialNav(),b("MutationUtils").highlightNode(a.currentNode),b("MutationUtils").maybeFocusNode(a.currentNode));case 4:case"end":return c.stop()}},null,this)};c.interceptBackKey=function(){var a;return b("regeneratorRuntime").async(function(c){while(1)switch(c.prev=c.next){case 0:c.next=2;return b("regeneratorRuntime").awrap(this.$10());case 2:a=c.sent,a&&a.config&&a.config.backKeyCallback&&a.config.backKeyCallback();case 4:case"end":return c.stop()}},null,this)};c.scrollToTop=function(){__p&&__p();var a,c,d,e;return b("regeneratorRuntime").async(function(f){__p&&__p();while(1)switch(f.prev=f.next){case 0:f.next=2;return b("regeneratorRuntime").awrap(this.$10());case 2:a=f.sent;if(!(a==null)){f.next=5;break}return f.abrupt("return");case 5:c=a.currentNode;d=b("SpatialNavTreeNodeUtils").getRootNode(c);e=b("SpatialNavTreeNodeUtils").getFirstHighlightableNode(d);if(!(e==null)){f.next=10;break}return f.abrupt("return");case 10:this.$9([{mutationType:b("SpatialNavMutationSpecTypes").MOVE_TO_NODE,currentNode:c,nextNode:e}]);case 11:case"end":return f.stop()}},null,this)};return a}();e.exports=new a()}),null); __d("KaiOSMenuHandler",["csx","cx","fbt","regeneratorRuntime","CSS","DOM","Event","KaiOSSoftkeyTrayLogger","MViewport","SpatialNavController","SpatialNavControllerTypes","SpatialNavTreeNodeUtils","Stratcom","URI"],(function(a,b,c,d,e,f,g,h,i){"use strict";__p&&__p();var j,k=b("SpatialNavControllerTypes").SpatialNavContextState;a=function(){__p&&__p();function a(){__p&&__p();var a=this;this.menuShown=!1;this.showPageSoftkeyTray=!1;this.toggleMenuVisibility=function(a,c){var d=b("MViewport").getScrollTop();if(d<=0)return;if(c)a.style.top="0px",a.classList.add("float");else{c=-Math.min(d,a.clientHeight);a.style.top=c+"px";a.classList.remove("float")}};this.$1=function(b){a.showFloatingMenu()};this.$2=function(c){var d=a.leftButtonElement;c=c.getData().path;if(a.menuShown&&d!=null){var e=null;c!=null&&(e=new(j||(j=b("URI")))(c).getQueryData().soft);c=new CustomEvent("kaios_close_menu",{detail:{focusFirstNode:e!=="search"}});d.dispatchEvent(c);b("MViewport").scrollToTop()}};this.$3=function(c){__p&&__p();c=c.detail;var d=c.leftButtonText;if(d!=null){a.showPageSoftkeyTray||b("DOM").show(a.softkeyTrayContainer);var e=c.leftButtonEvent,f=c.leftButtonLoggingId;f=b("DOM").create("div",{className:"_6ykc",id:f},d);b("DOM").replace(a.leftButtonElement,f);a.leftButtonElement=f;e!=null&&b("Event").listen(f,"click",function(b){b=new CustomEvent(e);window.dispatchEvent(b);a.restorePageTray()})}d=c.rightButtonText;if(d!=null){var g=c.rightButtonEvent;f=c.rightButtonLoggingId;f=b("DOM").create("div",{className:"_6ykd",id:f},d);b("DOM").replace(a.rightButtonElement,f);a.rightButtonElement=f;g!=null&&b("Event").listen(f,"click",function(a){a=new CustomEvent(g);window.dispatchEvent(a)})}d=c.centerButtonText;if(d!=null&&a.centerButtonElement!=null&&d!=a.centerButtonElement.textContent){f=b("DOM").create("div",{className:"_7gvg"},d);b("DOM").replace(a.centerButtonElement,f);a.centerButtonElement=f}};this.$4=function(b){a.restorePageTray()}}var c=a.prototype;c.handleKeyEvents=function(a){__p&&__p();if(this.softkeyTrayContainer==null||this.softkeyTrayContainer.style.display!=""||this.viewportElement!=null&&this.viewportElement.style.display!="")return!1;switch(a.key){case"SoftLeft":a=this.leftButtonElement;if(a!=null){a.click();b("KaiOSSoftkeyTrayLogger").logSoftkeyTrayButtonClicked(a.getAttribute("id"));return!0}break;case"SoftRight":a=this.rightButtonElement;if(a!=null){a.click();b("KaiOSSoftkeyTrayLogger").logSoftkeyTrayButtonClicked(a.getAttribute("id"));return!0}break;case"Backspace":case"BrowserBack":case"ArrowUp":case"ArrowDown":if(this.menuShown&&this.leftButtonElement!=null){this.leftButtonElement.click();return!0}break}return!1};c.showFloatingMenu=function(){var a=this.menuContainerElement;a!=null&&(this.menuShown=!0,this.toggleMenuVisibility(a,!0),this.maybeSetupSpatialNavV2(),this.updateBackgroundOverlayVisibility(!0),this.setupCloseMenuButton())};c.maybeSetupSpatialNavV2=function(){__p&&__p();var a,c,d,e,f;return b("regeneratorRuntime").async(function(g){__p&&__p();while(1)switch(g.prev=g.next){case 0:a=this.menuContainerElement;if(!(a==null)){g.next=3;break}return g.abrupt("return");case 3:g.next=5;return b("regeneratorRuntime").awrap(b("SpatialNavController").getCurrentState());case 5:c=g.sent,this.prevSpatialNavContextState=c.contextState,d=null,this.prevSpatialNavContextState===k.MENU_CONTEXT&&c.menuContext!=null?d=c.menuContext.currentNode.getHTMLElement():(e=a.getElementsByClassName("popoverOpen"),e.length!==0&&(d=e[0])),f={traverserType:"horizontal",pathType:7,isMenu:!1,disableScrollToNode:!0,focusMenuElementOnFirst:d,wrapAround:!0},b("SpatialNavController").setupNavOnContainer(a,f,!0);case 11:case"end":return g.stop()}},null,this)};c.setupCloseMenuButton=function(){__p&&__p();var a=this,c,d=this.leftButtonElement,e=this.rightButtonElement,f=this.centerButtonElement,g=(c=b("DOM")).create("div",{className:"_6ykc",id:"kaios_tray_menu_close"},i._("Close"));c.replace(this.leftButtonElement,g);this.leftButtonElement=g;var h=c.create("div"),j=c.create("div");c.replace(this.rightButtonElement,h);this.rightButtonElement=h;c.replace(this.centerButtonElement,j);this.centerButtonElement=j;b("Event").listen(g,"click",function(b){a.hideMenu(),a.swapButtons(g,d,h,e,j,f)});b("Event").listen(g,"kaios_close_menu",function(b){b=b.detail;var c=!0;typeof b==="object"&&("focusFirstNode"in b&&(c=b.focusFirstNode));a.hideMenu(c);a.swapButtons(g,d,h,e,j,f)})};c.hideMenu=function(a){__p&&__p();var c,d,e,f;return b("regeneratorRuntime").async(function(g){__p&&__p();while(1)switch(g.prev=g.next){case 0:a===void 0&&(a=!1);c=this.menuContainerElement;if(!c){g.next=32;break}this.menuShown=!1;this.toggleMenuVisibility(c,!1);g.next=7;return b("regeneratorRuntime").awrap(b("SpatialNavController").getCurrentStackContext());case 7:d=g.sent;if(!(d==null)){g.next=12;break}this.prevSpatialNavContextState=null;this.updateBackgroundOverlayVisibility(!1);return g.abrupt("return");case 12:e=d.currentNode;f=b("SpatialNavTreeNodeUtils").getRootNode(e);if(!(f.getHTMLElement()!==c)){g.next=19;break}b("SpatialNavController").removeContextByElement(c);this.prevSpatialNavContextState=null;this.updateBackgroundOverlayVisibility(!1);return g.abrupt("return");case 19:b("SpatialNavController").popContext();g.t0=this.prevSpatialNavContextState;g.next=g.t0===k.CONTEXT_STACK?23:g.t0===k.MENU_CONTEXT?25:g.t0===k.NO_CONTEXT?28:30;break;case 23:a&&b("SpatialNavController").scrollToTop();return g.abrupt("break",30);case 25:b("SpatialNavController").switchContext(k.MENU_CONTEXT,null,e);b("SpatialNavController").enableSpatialNav();return g.abrupt("break",30);case 28:b("SpatialNavController").disableSpatialNav(!0);return g.abrupt("break",30);case 30:this.prevSpatialNavContextState=null,this.updateBackgroundOverlayVisibility(!1);case 32:case"end":return g.stop()}},null,this)};c.swapButtons=function(a,c,d,e,f,g){b("DOM").replace(a,c),b("DOM").replace(d,e),b("DOM").replace(f,g),this.leftButtonElement=c,this.rightButtonElement=e,this.centerButtonElement=g};c.updateBackgroundOverlayVisibility=function(a){this.backgroundElement&&(a?this.backgroundElement.classList.add("shown"):this.backgroundElement.classList.remove("shown"))};c.restorePageTray=function(){this.showPageSoftkeyTray||b("DOM").hide(this.softkeyTrayContainer),b("DOM").replace(this.leftButtonElement,this.pageLeftButtonElement),b("DOM").replace(this.rightButtonElement,this.pageRightButtonElement),this.leftButtonElement=this.pageLeftButtonElement,this.rightButtonElement=this.pageRightButtonElement};c.restoreMenuOnInitIfShown=function(){this.menuShown&&this.hideMenu()};c.setupSoftKeyElements=function(a,b,c,d,e){this.backgroundElement=a,this.menuContainerElement=b,this.menuRootElement=c,this.softkeyTrayContainer=d,this.viewportElement=e};c.setupLeftButton=function(a){this.leftButtonElement=a,this.pageLeftButtonElement=a};c.setupMenuButton=function(a){this.setupLeftButton(a),this.menuShown=!1,b("Event").listen(a,"click",this.$1)};c.setupRightButton=function(a){this.rightButtonElement=a,this.pageRightButtonElement=a};c.setupCenterButton=function(a){this.centerButtonElement=a};c.setupHistoryListener=function(){b("Stratcom").listen("history:change",null,this.$2)};c.setupNavigationUpdateListener=function(){b("Event").listen(window,"m:kaios:spatialnav:update_tray",this.$3)};c.setupRestoreTrayListener=function(){b("Stratcom").listen("m:kaios:spatialav:restore_tray",null,this.$4)};c.setupSoftKeyTrayShowHideListener=function(){var a=this;b("Stratcom").listen("m:kaios:spatialnav:hide_tray",null,function(){if(!a.softkeyTrayContainer)return;b("CSS").addClass(a.softkeyTrayContainer,"_7hj_")});b("Stratcom").listen("m:kaios:spatialnav:show_tray",null,function(){if(!a.softkeyTrayContainer)return;b("CSS").removeClass(a.softkeyTrayContainer,"_7hj_")})};return a}();c={impl:new a(),setup:function(a){var c=document.querySelector("._6yui"),d=document.querySelector("._6ywo"),e=document.querySelector("._6usn"),f=document.getElementById("viewport"),g=document.getElementById("kaios_tray");this.impl.showPageSoftkeyTray=a;a||b("DOM").hide(g);this.impl.setupSoftKeyElements(c,d,e,g,f)},initForPage:function(a,b,c,d,e){this.setup(e),this.impl.setupNavigationUpdateListener(),this.impl.setupSoftKeyTrayShowHideListener(),this.impl.setupLeftButton(a),this.impl.setupCenterButton(d),this.impl.setupRightButton(b)},initForMenu:function(a){this.impl.restoreMenuOnInitIfShown(),this.impl.setupMenuButton(a),this.impl.setupHistoryListener(),this.impl.setupRestoreTrayListener(),this.impl.updateBackgroundOverlayVisibility(!1)},handleKeyEvents:function(a){return this.impl.handleKeyEvents(a)}};e.exports=c}),null); __d("KaiOSNavigatorUtils",["KaiOSConnectionHelper","KaiOSSendMessageUtil"],(function(a,b,c,d,e,f){"use strict";var g=new Map([["nav_mode","spatial"]]),h=new Map([["nav_mode","cursor"]]);function i(a){b("KaiOSSendMessageUtil").postMessage(b("KaiOSConnectionHelper").hostWindow,b("KaiOSSendMessageUtil").Type.TOGGLE_SPATIAL_NAV,a)}a={showCursor:function(){i(h)},hideCursor:function(){i(g)}};e.exports=a}),null); __d("KaiOSKeyEventHandlers",["KaiOSConnectionHelper","KaiOSControllerConfig","KaiOSControllerUtils","KaiOSHTMLElementUtils","KaiOSMenuHandler","KaiOSNavigatorUtils","KaiOSSendMessageUtil","MViewport","SpatialNavController","SpatialNavControllerUtils","URI","isLinkshimURI"],(function(a,b,c,d,e,f){"use strict";__p&&__p();var g;function a(a){__p&&__p();if(b("KaiOSControllerConfig").fullScreenVideoHandler&&b("KaiOSControllerConfig").fullScreenVideoHandler.handleClickEvent(a)){a.preventDefault();a.stopPropagation();return}var c=a.target,d=null;c&&c.tagName==="A"?d=c.href:c&&c.parentElement&&c.parentElement.tagName==="A"?d=c.parentElement.href:c&&c.parentElement&&c.parentElement.parentElement&&c.parentElement.parentElement.tagName==="A"&&(d=c.parentElement.parentElement.href);c=new(g||(g=b("URI")))(d);var e=d!=null&&d!==""&&!/\.facebook.com$/i.test(c.getDomain());d!=null&&(b("isLinkshimURI")(c)||e)&&(b("KaiOSControllerUtils").openUrl(d),a.preventDefault(),a.stopPropagation())}function h(a){return b("KaiOSControllerConfig").appVersion!=null&&!b("SpatialNavController").isSpatialNavEnabled()&&b("KaiOSHTMLElementUtils").isTextfieldInput(a.target)}function c(a){h(a)?b("KaiOSNavigatorUtils").hideCursor():b("SpatialNavController").isSpatialNavEnabled()&&a.target instanceof HTMLElement&&b("SpatialNavController").handleFocusChange(a.target)}function d(a){h(a)?b("KaiOSNavigatorUtils").showCursor():(a.target instanceof HTMLTextAreaElement||a.target instanceof HTMLInputElement)&&b("SpatialNavController").isSpatialNavEnabled()&&b("KaiOSNavigatorUtils").hideCursor()}function f(a){__p&&__p();if(b("KaiOSMenuHandler").handleKeyEvents(a)||b("KaiOSControllerConfig").fullScreenVideoHandler&&b("KaiOSControllerConfig").fullScreenVideoHandler.handleKeyDownEvent(a)){a.preventDefault();a.stopPropagation();return}switch(a.key){case"Backspace":if(n())break;case"BrowserBack":i(a);break;case"Enter":j(a);break;case"ArrowLeft":case"ArrowRight":case"ArrowUp":case"ArrowDown":k(a);break}}function i(a){b("SpatialNavController").isSpatialNavEnabled()&&b("SpatialNavControllerUtils").shouldInterceptBackKey(a)?(a.preventDefault(),a.stopPropagation(),b("SpatialNavController").interceptBackKey()):document.fullscreenElement?(document.exitFullscreen(),a.preventDefault(),a.stopPropagation()):b("KaiOSControllerUtils").keyDownEventHandledByRegPage(a.key)?(a.preventDefault(),a.stopPropagation()):b("KaiOSControllerUtils").isOnHomeOrConfPage()&&b("MViewport").getScrollTop()>5?(a.preventDefault(),a.stopPropagation(),b("SpatialNavController").isSpatialNavEnabled()==!0?b("SpatialNavController").scrollToTop():b("MViewport").scrollTo(0,0)):!b("KaiOSControllerUtils").isOnHomeOrConfPage()&&!b("KaiOSControllerUtils").shouldExitOnBackForLoggedOutPush()&&(b("KaiOSSendMessageUtil").postMessage(b("KaiOSConnectionHelper").hostWindow,b("KaiOSSendMessageUtil").Type.HANDLE_BACK),a.preventDefault(),a.stopPropagation())}function j(a){b("KaiOSControllerConfig").appVersion!=null&&a.target.type=="textarea"?(a.target.blur(),a.preventDefault(),a.stopPropagation()):k(a)}function k(a){b("SpatialNavController").isSpatialNavEnabled()&&!l(a)&&(a.preventDefault(),b("SpatialNavController").handleKeyDown(a))}function l(a){__p&&__p();var b=!1,c=m();switch(a.key){case"ArrowLeft":b=(a=c.shouldOverrideLeft)!=null?a:!1;break;case"ArrowRight":b=(a=c.shouldOverrideRight)!=null?a:!1;break;case"ArrowUp":b=(a=c.shouldOverrideUp)!=null?a:!1;break;case"ArrowDown":b=(a=c.shouldOverrideDown)!=null?a:!1;break;case"Enter":b=(a=c.shouldOverrideCSK)!=null?a:!1;break}return b}function m(){var a=document.activeElement;if(a instanceof HTMLInputElement&&b("KaiOSHTMLElementUtils").isTextfieldInput(a))return{shouldOverrideLeft:!0,shouldOverrideRight:!0};return a instanceof HTMLElement&&b("KaiOSHTMLElementUtils").isFileUploadElement(a)?{shouldOverrideCSK:!0}:{}}function n(){var a=document.activeElement;if(a&&a instanceof HTMLInputElement)return!0;else return!1}e.exports={interceptClick:a,handleTextfieldFocus:c,handleTextfieldBlur:d,handleKeyDown:f}}),null); __d("KaiOSLogger",["BanzaiLogger"],(function(a,b,c,d,e,f){"use strict";a={logAppVersion:function(a){b("BanzaiLogger").log("KaiOSEventsLoggerConfig",{event:"update_app_version",event_category:"app_info",app_version:a})},logWithBanzai:function(a,c,d){b("BanzaiLogger").log("KaiOSEventsLoggerConfig",{event:a,event_category:c,extra_data:d})},logAppMigrationEvent:function(a,c,d,e,f,g){var h=window.navigator.connection||null;b("BanzaiLogger").logImmediately("KaiOSAppMigrationLoggerConfig",babelHelpers["extends"]({event:a,migration_phase:c,experiment_name:f||"unknown",experiment_group:g||"unknown",duration_ms:d?Math.floor(d):0,connection_type:h&&h.type?h.type:"",connection_effective_type:h&&h.effectiveType?h.effectiveType:""},e))}};e.exports=a}),null); __d("XExternalShareComposerController",["XController"],(function(a,b,c,d,e,f){e.exports=b("XController").create("/kaiosapp/composer/",{csid:{type:"String"},length:{type:"Int"}})}),null); __d("KaiOSShareHandler",["XAsyncRequest","XExternalShareComposerController"],(function(a,b,c,d,e,f){"use strict";__p&&__p();a={handle:function(a){if(a===void 0)return;var c=Math.min(a.length,3),d=new FormData();for(var e=0;e